import React from 'react';
import { Button, message } from 'antd';

export default (props: { value: string }) => {
	const handleCopy = async () => {
		await navigator.clipboard.writeText(props.value);
		message.success('复制成功');
	}
	return (<Button style={{ marginLeft: 12 }} type="primary" size="small" onClick={handleCopy}>复制</Button>)
}